package com.eulog.client.blackJack;

import com.eulog.client.blackJack.BlackJackStrategy.SD;
import com.eulog.client.trump.TrumpCard;


public class BlackJackDealer extends BlackJackHuman {

	public BlackJackDealer(int money) {
		super(money);
	}
	
	@Override
	public BlackJackStrategy.SD getNextDecision(BlackJackStrategy blackJackStrategy, TrumpCard dealerOpenCard,int splitNo, BlackJackRules rules) {
		int eval = calculateRanks(splitNo);
		
		if(eval<17) return SD.H;
		if(eval<21 && isSoft(splitNo) && rules.doesDealerHitOnSoft17()) return SD.H;
		
		return SD.S;
	}
	
	public TrumpCard getOpenCard() {return handCardsList.get(0).get(0);}
}
